// 动态路由
import Layout from '../pages/layout'
// ---------- 系统管理 -------------

let platformRouter = [
    {
        path: '/usercenter',
        component: Layout,
        meta: {title: '元数据', icon: 'user', group: 'usercenter'},
        children: [
            {
                path: 'usercenter/subsys/Manage',
                component: require('@/pages/platform/meta/subsys/Manage.vue'),
                name: 'subsys:manage',
                meta: {title: '应用系统', perm: 'subsys:manage'}
            },
            {
                path: 'usercenter/metadata/Manage1',
                component: require('@/pages/platform/meta/metadata/Manage.vue'),
                name: 'metadata:manage1',
                meta: {title: '元数据字典', perm: 'metadata:manage'}
            },
            {
                path: 'usercenter/dictdata/Manage',
                component: require('@/pages/platform/meta/dictdata/Manage.vue'),
                name: 'dictdata:manage',
                meta: {title: '数据字典', perm: 'dictdata:manage'}
            }

        ]
    },

    {
        path: '/sys',
        component: Layout,
        meta: {
            title: '系统管理', icon: 'system', group: 'sys'
        },
        children: [{
            path: 'corp/manage',
            name: 'sys:corp:manage',
            component: require('@/pages/platform/sys/corp/ManagePanel.vue'),
            meta: {
                title: '企业信息', perm: 'corp:manage'
            },
            hidden: true
        }, {
            path: 'org/manage',
            name: 'sys:org:manage',
            component: require('@/pages/platform/sys/org/ManagePanel.vue'),
            meta: {
                title: '组织结构',
                perm: 'sysOrg:manage'

            }
        }, {
            path: 'user/manage',
            name: 'sys:user:manage',
            component: require('@/pages/platform/sys/user/ManagePanel.vue'),
            meta: {
                title: '用户管理',
                perm: 'sysUser:manage'
            }
        }, {
            path: 'role/manage',
            name: 'sys:role:manage',
            component: require('@/pages/platform/sys/role/ManagePanel.vue'),
            meta: {
                title: '角色管理',
                perm: 'sysRole:manage'
            }
        }, {
            path: 'dict',
            name: 'sys:dict:manage',
            component: require('@/pages/platform/sys/dict/ManagePanel.vue'),
            meta: {
                title: '字典管理',
                perm: 'sysDict:manage'
            }
        }


        ]
    },
    {
        path: '/systool',
        component: Layout,
        meta: {title: '系统工具', icon: 'user', group: 'sys'},
        children: [

            {
                path: 'platform/metadata/Manage',
                component: require('@/pages/platform/meta/metadata/Manage.vue'),
                name: 'systool:datasource',
                meta: {title: '数据源', perm: 'systool:datasource'}
            },
            {
                path: 'platform/dictdata/Manage',
                component: require('@/pages/platform/meta/dictdata/Manage.vue'),
                name: 'systool:codegen',
                meta: {title: '代码生成', perm: 'systool:codegen'}
            }
        ]
    }
]

export default platformRouter;
